package org.bonorsoft.modules.system.schedules;

import org.bonorsoft.common.util.DateUtils;
import org.bonorsoft.modules.hospital.service.IZzyjsViewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class WilliamSyncJob {

    @Autowired
    private IZzyjsViewService zzyjsViewService;

    //每六小时执行一次  0 0 0/6 * * ? *
    //每一分钟  0 * * * * ? *
    @Scheduled(cron = "0 0 0/1 * * *")
    public void job(){
        System.out.println(DateUtils.getDate() + "=========定时任务=========");
        zzyjsViewService.importData();
    }


}
